home *** CD-ROM | disk | FTP | other *** search
/ Shareware Extravaganza - Disc 4 / Shareware Extravaganza - Over 25,000 Programs (The Ultimate Shareware Company)(Disc 4 of 4)(1993).iso / cad / dimf.zip / FIXDIM.LSP < prev    next >
Lisp/Scheme  |  1990-12-02  |  1KB  |  50 lines

  1. ;
  2. ;  FIXDIM requires the DIMF.shx font be placed in your current
  3. ;  AutoCAD path, preferably with the rest of your fonts.  It
  4. ;  assumes that you normally use a style called "DIM" for dimensions.
  5. ;  If you normally use a different style, change lines "A" and "B" to
  6. ;  reflect your style name.  It also requires the UPDATE command of
  7. ;  Release 10.  Assuming Release 11 has this command, FIXDIM ought to
  8. ;  work with it as well.  See the Read.me file for more information.
  9. ;
  10. ;  Walter Warren
  11. ;  (73750,3535)
  12.   
  13. (defun c:fixdim (/ sty ss)
  14.  (setvar "cmdecho" 0)
  15.  (setq sty (getvar "textstyle"))
  16.  (cond
  17.   ((= sty "DIMF")
  18.    (prompt "Select dimensions w/o fractions:")
  19.    (setq ss (ssget))
  20.    (command "dim" "style" "dim")                ;Line A
  21.   )
  22.   ((/= sty "DIMF")
  23.    (prompt "Select dimensions w/ fractions:")
  24.    (setq ss (ssget))
  25.    (command "dim" "style" "dimf")
  26.   )
  27.  )
  28.  (command "update" ss "")
  29.  (command "style" sty "exit")
  30.  (setvar "cmdecho" 1)
  31.  (prin1)
  32. )
  33.  
  34. (defun fixdim (/ sty)
  35.  (setvar "cmdecho" 0)
  36.  (setq sty (getvar "textstyle"))
  37.  (cond
  38.   ((= sty "DIMF")
  39.    (command "style" "dim")                      ;Line B
  40.   )
  41.   ((/= sty "DIMF")
  42.    (command "style" "dimf")
  43.   )
  44.  )
  45.  (command "update" (entlast) "")
  46.  (command "style" sty)
  47.  (setvar "cmdecho" 1)
  48.  (prin1)
  49. )
  50.